<?php 
session_start();
$lang = $_REQUEST['lang'];
if (empty($lang) || $lang == "EN") {
	include "../../value/value_en.php";
} else if($lang == "VN") {
	include "../../value/value_vn.php";
}
else {
	include "../../value/value_kr.php";
}
include '../../operations/connection.php';
$id_employee=$_REQUEST['idem'];
$mysqli = new mysqli("14.63.219.99", "cam", "5678","elihan");
	$query = mysqli_query($mysqli,"call getTotalDocument($id_employee)");	
	while($row = mysqli_fetch_array($query)){
		$num_re_pending = $row[RePendingDoc];
		$num_re_not_approve = $row[ReNotApprovedDoc];
		$num_re_approved= $row[ReApprovedDoc];
		
		$num_meeting= $row[ReMeetingDoc];
		$num_re_declined = $row[ReDeclinedDoc];
		$num_re_reference_approved = $row[ReRefApprovedDoc];
		$num_re_reference_waiting = $row[ReRefWaitingDoc];
		$num_re_received_metting = $row[ReMeetingDoc];
		
		
		$num_my_sendingDoc=$row[MySendingDoc];
		$num_my_savedDoc=$row[MySavedDoc];
		$num_my_approveDoc=$row[MyApproveDoc];
		$num_my_declinedDoc=$row[MyDeclinedDoc];
		$num_my_meetingDoc=$row[MyMeetingDoc];
		
		$num_bin_re_doc = $row[BinReceiverDoc];
		$num_bin_se_doc = $row[BinSendingDoc];
	}
	
	$mysqli->close();
?>
<?php 
	if($_REQUEST['typeview']==4){
		$sql="SELECT a.isView  
			FROM approvedoc a,employee e 
			WHERE a.IDEmployee=e.IDEmployee  and a.IDLabel<1 AND a.IDEmployee='$id_employee' AND a.IDStatus=1 AND a.isView=0;";
			$myappmysql=mysql_query($sql);
		?>
		<span><img src="images/index_25.gif" alt="" /><a
														href="mydocument.php?content=list-mydocument-approved-content"><?=$l_my_approveDoc?>
															(<label id="num_my_approveDoc"><?php if (mysql_num_rows($myappmysql)==0){?>
																	<?=$num_my_approveDoc?>
																<?php }else{?>
																	<b><?=$num_my_approveDoc?></b>
																<?php }?></label>)</a> </span>
		<?php 
	}else if($_REQUEST['typeview']=='1'){
		?>
		<span><img src="images/index_25.gif" alt="" /><a
														href="received.php?content=list-receiver-declined-content"><?=$l_declined_document?>
															(<label id="num_re_declined"><?=$num_re_declined?></label>)</a> </span>
		<?php 
	}else if($_REQUEST['typeview']=='2'){
		?>
		<span><img src="images/index_25.gif" alt="" /><a
														href="received.php?content=list-receiver-approved-content"><?=$l_approved_document?>
															(<label id="num_re_approved"><?=$num_re_approved?></label>)</a> </span>
		<?php 
	}else if($_REQUEST['typeview']=='3'){
		?>
		<span><img src="images/index_25.gif" alt="" /><a
														href="received.php?content=list-receiver-reference-approved-content"><?=$l_reference_document_approved?>
															(<label id="num_re_reference_approved"><?=$num_re_reference_approved?></label>)</a> </span>
		<?php 
	}
?>
<?php mysql_close($connection);?>